Hurricanes

StormR: IBTrACS

librarian::shelf(
  dplyr, glue, here, mapview, rworldxtra, sf, 
  StormR, 
  # umr-amap/StormR,
  tbep-tech/tbeptools)

  The 'cran_repo' argument in shelf() was not set, so it will use
  cran_repo = 'https://cran.r-project.org' by default.

  To avoid this message, set the 'cran_repo' argument to a CRAN
  mirror URL (see https://cran.r-project.org/mirrors.html) or set
  'quiet = TRUE'.
# devtools::load_all("~/Github/bbest/StormR")

url_nc <- "https://www.ncei.noaa.gov/data/international-best-track-archive-for-climate-stewardship-ibtracs/v04r01/access/netcdf/IBTrACS.NA.v04r01.nc" # 4 MB
nc <- here(glue("data/storms/{basename(url_nc)}")) # 1.1 MB

if (!file.exists(nc)){ # TODO: check if file is up-to-date
  dir.create(dirname(nc), showWarnings = F)
  download.file(url_nc, nc)
}

sds <- defStormsDataset(nc, basin = "NA")
=== Loading data  ===
Open database... /Users/bbest/Github/tbep-tech/climate-change-indicators/data/storms/IBTrACS.NA.v04r01.nc opened
Collecting data ...
=== DONE ===
str(sds)
Formal class 'stormsDataset' [package "StormR"] with 5 slots
  ..@ filename: chr "/Users/bbest/Github/tbep-tech/climate-change-indicators/data/storms/IBTrACS.NA.v04r01.nc"
  ..@ fields  : Named chr [1:10] "name" "season" "iso_time" "usa_lon" ...
  .. ..- attr(*, "names")= chr [1:10] "names" "seasons" "isoTime" "lon" ...
  ..@ basin   : chr "NA"
  ..@ seasons : Named int [1:2] 1980 2024
  .. ..- attr(*, "names")= chr [1:2] "min" "max"
  ..@ database:List of 9
  .. ..$ names    : chr [1:712(1d)] "UNNAMED" "UNNAMED" "UNNAMED" "ALLEN" ...
  .. ..$ seasons  : int [1:712(1d)] 1980 1980 1980 1980 1980 1980 1980 1980 1980 1980 ...
  .. ..$ isotimes : chr [1:360, 1:712] "1980-07-17 00:00:00" "1980-07-17 03:00:00" "1980-07-17 06:00:00" "1980-07-17 09:00:00" ...
  .. ..$ longitude: num [1:360, 1:712] -76.5 -76.9 -77.2 -77.6 -78 ...
  .. ..$ latitude : num [1:360, 1:712] 30.5 30.3 30.2 30.1 30 ...
  .. ..$ msw      : num [1:360, 1:712] 10.3 11.8 12.8 12.8 12.8 ...
  .. ..$ rmw      : num [1:360, 1:712] NA NA NA NA NA NA NA NA NA NA ...
  .. ..$ pressure : num [1:360, 1:712] NA NA NA NA NA NA NA NA NA NA ...
  .. ..$ poci     : num [1:360, 1:712] NA NA NA NA NA NA NA NA NA NA ...
length(unique(paste(sds@database$names, sds@database$seasons, " "))) # 622
[1] 622
# get centroid point of Tampa Bay watershed
pt <- tbeptools::tbshed |> 
  st_centroid() 
Warning: st_centroid assumes attributes are constant over geometries
# st_coordinates(pt) |> as.numeric()
# -82.35778  27.86714
buf_km <- 1000
ply <- pt |> 
  st_buffer(buf_km*1000)

mapView(ply) +
  mapView(pt)
c(sds@seasons["min"], sds@seasons["max"]) |> as.integer()
[1] 1980 2024
# 1980 2024
# st <- defStormsList(sds, pt, maxDist = buf_km, seasons = c(1987,2024)) # FAILS

yrs <- c(1980,2024)
st <- defStormsList(
  sds, 
  pt, 
  maxDist     = buf_km, 
  removeUnder = 1,
  seasons     = yrs)
=== Storms processing ... ===

-> Making buffer: Done
-> Searching storms from 1980 to 2024 ...
   -> Identifying Storms: 569 potential candidates...
-> Gathering storm(s) ... 

  |                                                                            
  |                                                                      |   0%
  |                                                                            
  |                                                                      |   1%
  |                                                                            
  |=                                                                     |   1%
  |                                                                            
  |=                                                                     |   2%
  |                                                                            
  |==                                                                    |   2%
  |                                                                            
  |==                                                                    |   3%
  |                                                                            
  |==                                                                    |   4%
  |                                                                            
  |===                                                                   |   4%
  |                                                                            
  |===                                                                   |   5%
  |                                                                            
  |====                                                                  |   5%
  |                                                                            
  |====                                                                  |   6%
  |                                                                            
  |=====                                                                 |   7%
  |                                                                            
  |=====                                                                 |   8%
  |                                                                            
  |======                                                                |   8%
  |                                                                            
  |======                                                                |   9%
  |                                                                            
  |=======                                                               |   9%
  |                                                                            
  |=======                                                               |  10%
  |                                                                            
  |=======                                                               |  11%
  |                                                                            
  |========                                                              |  11%
  |                                                                            
  |========                                                              |  12%
  |                                                                            
  |=========                                                             |  12%
  |                                                                            
  |=========                                                             |  13%
  |                                                                            
  |=========                                                             |  14%
  |                                                                            
  |==========                                                            |  14%
  |                                                                            
  |==========                                                            |  15%
  |                                                                            
  |===========                                                           |  15%
  |                                                                            
  |===========                                                           |  16%
  |                                                                            
  |============                                                          |  17%
  |                                                                            
  |============                                                          |  18%
  |                                                                            
  |=============                                                         |  18%
  |                                                                            
  |=============                                                         |  19%
  |                                                                            
  |==============                                                        |  19%
  |                                                                            
  |==============                                                        |  20%
  |                                                                            
  |==============                                                        |  21%
  |                                                                            
  |===============                                                       |  21%
  |                                                                            
  |===============                                                       |  22%
  |                                                                            
  |================                                                      |  22%
  |                                                                            
  |================                                                      |  23%
  |                                                                            
  |=================                                                     |  24%
  |                                                                            
  |=================                                                     |  25%
  |                                                                            
  |==================                                                    |  25%
  |                                                                            
  |==================                                                    |  26%
  |                                                                            
  |===================                                                   |  27%
  |                                                                            
  |===================                                                   |  28%
  |                                                                            
  |====================                                                  |  28%
  |                                                                            
  |====================                                                  |  29%
  |                                                                            
  |=====================                                                 |  29%
  |                                                                            
  |=====================                                                 |  30%
  |                                                                            
  |=====================                                                 |  31%
  |                                                                            
  |======================                                                |  31%
  |                                                                            
  |======================                                                |  32%
  |                                                                            
  |=======================                                               |  32%
  |                                                                            
  |=======================                                               |  33%
  |                                                                            
  |========================                                              |  34%
  |                                                                            
  |========================                                              |  35%
  |                                                                            
  |=========================                                             |  35%
  |                                                                            
  |=========================                                             |  36%
  |                                                                            
  |==========================                                            |  36%
  |                                                                            
  |==========================                                            |  37%
  |                                                                            
  |==========================                                            |  38%
  |                                                                            
  |===========================                                           |  38%
  |                                                                            
  |===========================                                           |  39%
  |                                                                            
  |============================                                          |  39%
  |                                                                            
  |============================                                          |  40%
  |                                                                            
  |============================                                          |  41%
  |                                                                            
  |=============================                                         |  41%
  |                                                                            
  |=============================                                         |  42%
  |                                                                            
  |==============================                                        |  42%
  |                                                                            
  |==============================                                        |  43%
  |                                                                            
  |===============================                                       |  44%
  |                                                                            
  |===============================                                       |  45%
  |                                                                            
  |================================                                      |  45%
  |                                                                            
  |================================                                      |  46%
  |                                                                            
  |=================================                                     |  46%
  |                                                                            
  |=================================                                     |  47%
  |                                                                            
  |=================================                                     |  48%
  |                                                                            
  |==================================                                    |  48%
  |                                                                            
  |==================================                                    |  49%
  |                                                                            
  |===================================                                   |  49%
  |                                                                            
  |===================================                                   |  50%
  |                                                                            
  |===================================                                   |  51%
  |                                                                            
  |====================================                                  |  51%
  |                                                                            
  |====================================                                  |  52%
  |                                                                            
  |=====================================                                 |  52%
  |                                                                            
  |=====================================                                 |  53%
  |                                                                            
  |=====================================                                 |  54%
  |                                                                            
  |======================================                                |  54%
  |                                                                            
  |======================================                                |  55%
  |                                                                            
  |=======================================                               |  55%
  |                                                                            
  |=======================================                               |  56%
  |                                                                            
  |========================================                              |  57%
  |                                                                            
  |========================================                              |  58%
  |                                                                            
  |=========================================                             |  58%
  |                                                                            
  |=========================================                             |  59%
  |                                                                            
  |==========================================                            |  59%
  |                                                                            
  |==========================================                            |  60%
  |                                                                            
  |==========================================                            |  61%
  |                                                                            
  |===========================================                           |  61%
  |                                                                            
  |===========================================                           |  62%
  |                                                                            
  |============================================                          |  62%
  |                                                                            
  |============================================                          |  63%
  |                                                                            
  |============================================                          |  64%
  |                                                                            
  |=============================================                         |  64%
  |                                                                            
  |=============================================                         |  65%
  |                                                                            
  |==============================================                        |  65%
  |                                                                            
  |==============================================                        |  66%
  |                                                                            
  |===============================================                       |  67%
  |                                                                            
  |===============================================                       |  68%
  |                                                                            
  |================================================                      |  68%
  |                                                                            
  |================================================                      |  69%
  |                                                                            
  |=================================================                     |  69%
  |                                                                            
  |=================================================                     |  70%
  |                                                                            
  |=================================================                     |  71%
  |                                                                            
  |==================================================                    |  71%
  |                                                                            
  |==================================================                    |  72%
  |                                                                            
  |===================================================                   |  72%
  |                                                                            
  |===================================================                   |  73%
  |                                                                            
  |====================================================                  |  74%
  |                                                                            
  |====================================================                  |  75%
  |                                                                            
  |=====================================================                 |  75%
  |                                                                            
  |=====================================================                 |  76%
  |                                                                            
  |======================================================                |  77%
  |                                                                            
  |======================================================                |  78%
  |                                                                            
  |=======================================================               |  78%
  |                                                                            
  |=======================================================               |  79%
  |                                                                            
  |========================================================              |  79%
  |                                                                            
  |========================================================              |  80%
  |                                                                            
  |========================================================              |  81%
  |                                                                            
  |=========================================================             |  81%
  |                                                                            
  |=========================================================             |  82%
  |                                                                            
  |==========================================================            |  82%
  |                                                                            
  |==========================================================            |  83%
  |                                                                            
  |===========================================================           |  84%
  |                                                                            
  |===========================================================           |  85%
  |                                                                            
  |============================================================          |  85%
  |                                                                            
  |============================================================          |  86%
  |                                                                            
  |=============================================================         |  86%
  |                                                                            
  |=============================================================         |  87%
  |                                                                            
  |=============================================================         |  88%
  |                                                                            
  |==============================================================        |  88%
  |                                                                            
  |==============================================================        |  89%
  |                                                                            
  |===============================================================       |  89%
  |                                                                            
  |===============================================================       |  90%
  |                                                                            
  |===============================================================       |  91%
  |                                                                            
  |================================================================      |  91%
  |                                                                            
  |================================================================      |  92%
  |                                                                            
  |=================================================================     |  92%
  |                                                                            
  |=================================================================     |  93%
  |                                                                            
  |==================================================================    |  94%
  |                                                                            
  |==================================================================    |  95%
  |                                                                            
  |===================================================================   |  95%
  |                                                                            
  |===================================================================   |  96%
  |                                                                            
  |====================================================================  |  96%
  |                                                                            
  |====================================================================  |  97%
  |                                                                            
  |====================================================================  |  98%
  |                                                                            
  |===================================================================== |  98%
  |                                                                            
  |===================================================================== |  99%
  |                                                                            
  |======================================================================|  99%
  |                                                                            
  |======================================================================| 100%

=== DONE with run time 2.045528 sec ===

SUMMARY:
(*) LOI: sf object (use getLOI function for further informations
(*) Buffer size: 1000 km
(*) Remove Storms under level  1  in the scale
(*) Number of storms: 221 
        Name - Tropical season - Scale - Number of observation within buffer:
        ALLEN - 1980 - 6 - 17 
        DANIELLE - 1980 - 1 - 7 
        JEANNE - 1980 - 3 - 35 
        ARLENE - 1981 - 1 - 11 
        DENNIS - 1981 - 2 - 44 
        EMILY - 1981 - 2 - 1 
        GERT - 1981 - 3 - 9 
        KATRINA - 1981 - 2 - 19 
        UNNAMED - 1981 - 1 - 3 
        ALBERTO - 1982 - 2 - 33 
        UNNAMED - 1982 - 1 - 12 
        CHRIS - 1982 - 1 - 5 
        ALICIA - 1983 - 4 - 9 
        BARRY - 1983 - 2 - 32 
        DEAN - 1983 - 1 - 8 
        DIANA - 1984 - 5 - 50 
        ISIDORE - 1984 - 1 - 36 
        JOSEPHINE - 1984 - 3 - 11 
        BOB - 1985 - 2 - 37 
        CLAUDETTE - 1985 - 2 - 10 
        DANNY - 1985 - 2 - 43 
        ELENA - 1985 - 4 - 45 
        GLORIA - 1985 - 5 - 13 
        HENRI - 1985 - 1 - 10 
        ISABEL - 1985 - 1 - 50 
        JUAN - 1985 - 2 - 43 
        KATE - 1985 - 4 - 35 
        ANDREW - 1986 - 1 - 23 
        BONNIE - 1986 - 2 - 18 
        CHARLEY - 1986 - 2 - 34 
        ARLENE - 1987 - 2 - 34 
        UNNAMED - 1987 - 1 - 46 
        FLOYD - 1987 - 2 - 21 
        BERYL - 1988 - 1 - 18 
        CHRIS - 1988 - 1 - 23 
        FLORENCE - 1988 - 2 - 25 
        GILBERT - 1988 - 6 - 11 
        KEITH - 1988 - 2 - 29 
        CHANTAL - 1989 - 2 - 12 
        HUGO - 1989 - 6 - 14 
        KAREN - 1989 - 1 - 20 
        BERTHA - 1990 - 2 - 28 
        KLAUS - 1990 - 2 - 1 
        MARCO - 1990 - 1 - 33 
        ANA - 1991 - 1 - 33 
        BOB - 1991 - 4 - 24 
        FABIAN - 1991 - 1 - 15 
        ANDREW - 1992 - 6 - 41 
        DANIELLE - 1992 - 1 - 4 
        EARL - 1992 - 1 - 33 
        EMILY - 1993 - 4 - 4 
        ALBERTO - 1994 - 1 - 61 
        BERYL - 1994 - 1 - 26 
        GORDON - 1994 - 2 - 65 
        ALLISON - 1995 - 2 - 27 
        DEAN - 1995 - 1 - 14 
        ERIN - 1995 - 2 - 34 
        OPAL - 1995 - 5 - 20 
        ROXANNE - 1995 - 4 - 10 
        ARTHUR - 1996 - 1 - 19 
        BERTHA - 1996 - 4 - 25 
        FRAN - 1996 - 4 - 22 
        JOSEPHINE - 1996 - 1 - 17 
        LILI - 1996 - 4 - 19 
        MARCO - 1996 - 2 - 9 
        UNNAMED - 1997 - 1 - 7 
        ANA - 1997 - 1 - 13 
        CLAUDETTE - 1997 - 1 - 7 
        DANNY - 1997 - 2 - 64 
        BONNIE - 1998 - 4 - 26 
        DANIELLE - 1998 - 3 - 15 
        EARL - 1998 - 3 - 21 
        GEORGES - 1998 - 5 - 57 
        HERMINE - 1998 - 1 - 23 
        MITCH - 1998 - 6 - 15 
        DENNIS - 1999 - 3 - 58 
        FLOYD - 1999 - 5 - 22 
        HARVEY - 1999 - 1 - 23 
        IRENE - 1999 - 4 - 37 
        FLORENCE - 2000 - 2 - 30 
        GORDON - 2000 - 2 - 39 
        HELENE - 2000 - 1 - 33 
        LESLIE - 2000 - 1 - 16 
        UNNAMED - 2000 - 1 - 5 
        ALLISON - 2001 - 1 - 37 
        BARRY - 2001 - 1 - 40 
        GABRIELLE - 2001 - 2 - 40 
        MICHELLE - 2001 - 5 - 22 
        ARTHUR - 2002 - 1 - 2 
        CRISTOBAL - 2002 - 1 - 24 
        EDOUARD - 2002 - 1 - 40 
        GUSTAV - 2002 - 3 - 11 
        HANNA - 2002 - 1 - 29 
        ISIDORE - 2002 - 4 - 54 
        KYLE - 2002 - 2 - 26 
        LILI - 2002 - 5 - 27 
        BILL - 2003 - 1 - 28 
        CLAUDETTE - 2003 - 2 - 22 
        ERIKA - 2003 - 2 - 8 
        HENRI - 2003 - 1 - 41 
        ISABEL - 2003 - 6 - 12 
        ALEX - 2004 - 4 - 24 
        BONNIE - 2004 - 1 - 44 
        CHARLEY - 2004 - 5 - 19 
        FRANCES - 2004 - 5 - 48 
        GASTON - 2004 - 2 - 26 
        IVAN - 2004 - 6 - 77 
        JEANNE - 2004 - 4 - 33 
        MATTHEW - 2004 - 1 - 12 
        ARLENE - 2005 - 1 - 25 
        CINDY - 2005 - 2 - 28 
        DENNIS - 2005 - 5 - 29 
        EMILY - 2005 - 6 - 8 
        FRANKLIN - 2005 - 1 - 21 
        KATRINA - 2005 - 6 - 54 
        OPHELIA - 2005 - 2 - 78 
        RITA - 2005 - 6 - 36 
        TAMMY - 2005 - 1 - 15 
        WILMA - 2005 - 6 - 33 
        ALBERTO - 2006 - 1 - 37 
        BERYL - 2006 - 1 - 1 
        CHRIS - 2006 - 1 - 10 
        ERNESTO - 2006 - 2 - 32 
        ANDREA - 2007 - 2 - 49 
        BARRY - 2007 - 1 - 25 
        ERIN - 2007 - 1 - 2 
        GABRIELLE - 2007 - 1 - 14 
        HUMBERTO - 2007 - 2 - 3 
        NOEL - 2007 - 2 - 30 
        OLGA - 2007 - 1 - 23 
        CRISTOBAL - 2008 - 1 - 16 
        DOLLY - 2008 - 3 - 7 
        EDOUARD - 2008 - 1 - 14 
        FAY - 2008 - 1 - 44 
        GUSTAV - 2008 - 5 - 24 
        HANNA - 2008 - 2 - 17 
        IKE - 2008 - 5 - 36 
        PALOMA - 2008 - 5 - 51 
        CLAUDETTE - 2009 - 1 - 13 
        DANNY - 2009 - 1 - 14 
        IDA - 2009 - 3 - 28 
        BONNIE - 2010 - 1 - 25 
        EARL - 2010 - 5 - 12 
        NICOLE - 2010 - 1 - 21 
        PAULA - 2010 - 3 - 23 
        BRET - 2011 - 1 - 37 
        DON - 2011 - 1 - 14 
        EMILY - 2011 - 1 - 19 
        IRENE - 2011 - 4 - 24 
        LEE - 2011 - 1 - 36 
        RINA - 2011 - 4 - 11 
        ALBERTO - 2012 - 1 - 30 
        BERYL - 2012 - 1 - 44 
        DEBBY - 2012 - 1 - 33 
        ISAAC - 2012 - 2 - 38 
        SANDY - 2012 - 4 - 24 
        ANDREA - 2013 - 1 - 17 
        DORIAN - 2013 - 1 - 32 
        KAREN - 2013 - 1 - 25 
        ARTHUR - 2014 - 3 - 45 
        BERTHA - 2014 - 2 - 9 
        ANA - 2015 - 1 - 42 
        JOAQUIN - 2015 - 5 - 15 
        KATE - 2015 - 2 - 13 
        ALEX - 2016 - 2 - 7 
        BONNIE - 2016 - 1 - 49 
        COLIN - 2016 - 1 - 18 
        HERMINE - 2016 - 2 - 45 
        JULIA - 2016 - 1 - 62 
        MATTHEW - 2016 - 6 - 30 
        CINDY - 2017 - 1 - 15 
        EMILY - 2017 - 1 - 19 
        HARVEY - 2017 - 5 - 4 
        UNNAMED - 2017 - 1 - 16 
        IRMA - 2017 - 6 - 35 
        MARIA - 2017 - 6 - 18 
        NATE - 2017 - 2 - 19 
        ALBERTO - 2018 - 1 - 31 
        BERYL - 2018 - 2 - 9 
        CHRIS - 2018 - 3 - 33 
        FLORENCE - 2018 - 5 - 35 
        GORDON - 2018 - 1 - 28 
        MICHAEL - 2018 - 5 - 33 
        BARRY - 2019 - 2 - 27 
        DORIAN - 2019 - 6 - 49 
        HUMBERTO - 2019 - 4 - 43 
        NESTOR - 2019 - 1 - 17 
        OLGA - 2019 - 1 - 5 
        ARTHUR - 2020 - 1 - 15 
        BERTHA - 2020 - 1 - 8 
        CRISTOBAL - 2020 - 1 - 20 
        FAY - 2020 - 1 - 34 
        HANNA - 2020 - 2 - 12 
        ISAIAS - 2020 - 2 - 30 
        LAURA - 2020 - 5 - 21 
        MARCO - 2020 - 2 - 29 
        SALLY - 2020 - 4 - 54 
        BETA - 2020 - 1 - 15 
        GAMMA - 2020 - 1 - 22 
        DELTA - 2020 - 5 - 19 
        ZETA - 2020 - 4 - 25 
        ETA - 2020 - 5 - 50 
        BILL - 2021 - 1 - 6 
        CLAUDETTE - 2021 - 1 - 26 
        DANNY - 2021 - 1 - 11 
        ELSA - 2021 - 2 - 33 
        FRED - 2021 - 1 - 41 
        GRACE - 2021 - 4 - 8 
        HENRI - 2021 - 2 - 10 
        IDA - 2021 - 5 - 41 
        MINDY - 2021 - 1 - 13 
        NICHOLAS - 2021 - 2 - 8 
        ODETTE - 2021 - 1 - 9 
        WANDA - 2021 - 1 - 2 
        ALEX - 2022 - 1 - 24 
        IAN - 2022 - 6 - 39 
        NICOLE - 2022 - 2 - 26 
        HAROLD - 2023 - 1 - 4 
        IDALIA - 2023 - 5 - 43 
        OPHELIA - 2023 - 1 - 18 
        BERYL - 2024 - 6 - 9 
d <- tibble(
  storm = getNames(st),
  year  = getSeasons(st) |> as.numeric(),
  scale = getScale(st) |> as.numeric()) # A tibble: 67 × 3

d_sum <- d |>
  group_by(year) |>
  summarize(
    sum_scale = sum(scale))

plot(d_sum)

(yr_max <- d_sum$year[which.max(d_sum$sum_scale)])
[1] 2005
d |> 
  filter(year == yr_max)
# A tibble: 10 × 3
   storm     year scale
   <chr>    <dbl> <dbl>
 1 ARLENE    2005     1
 2 CINDY     2005     2
 3 DENNIS    2005     5
 4 EMILY     2005     6
 5 FRANKLIN  2005     1
 6 KATRINA   2005     6
 7 OPHELIA   2005     2
 8 RITA      2005     6
 9 TAMMY     2005     1
10 WILMA     2005     6
st_years <- function(st, yrs){
  # yrs <- c(2000, 2010)
  st_yrs <- getSeasons(st) |> as.numeric()
  i_yrs <- st_yrs >= yrs[1] & st_yrs <= yrs[2]
  st@data <- st@data[i_yrs]
  st
}

plotStorms(st_years(st, c(2005, 2005)), dynamicPlot = T)
plotStorms(st, dynamicPlot = T)
  • By default the Saffir-Simpson hurricane wind scale (SSHS)
=== Storms processing ... ===

-> Making buffer: Done
-> Searching storms from 1980 to 2024 ...
   -> Identifying Storms: 712 potential candidates...
-> Gathering storm(s) ... 
  |========================================================================| 100%

=== DONE with run time 4.678652 sec ===

SUMMARY:
(*) LOI: 277.6422 27.86714 lon-lat
(*) Buffer size: 300 km
(*) Number of storms: 79 
        Name - Tropical season - Scale - Number of observation within buffer:
Error in sts@data[[ind]] : subscript out of bounds
traceback()
7: getStorm(s, name, season)
6: getStorm(s, name, season)
5: .local(s, ...)
4: getInObs(sts, getNames(sts@data[[i]]), getSeasons(sts@data[[i]]))
3: getInObs(sts, getNames(sts@data[[i]]), getSeasons(sts@data[[i]]))
2: cat("       ", getNames(sts@data[[i]]), "-", getSeasons(sts@data[[i]]), 
       "-", getScale(sts@data[[i]]), "-", length(getInObs(sts, getNames(sts@data[[i]]), 
           getSeasons(sts@data[[i]]))), "\n")
1: defStormsList(sds, xy, maxDist = buf_km)

other

HURDAT2 is considered most authoritative, but per the NHC Data Archive is only updated annually around April.

Citation

New users should document their data usage and provide feedback by completing IBTrACS voluntary User Registration. This information helps the IBTrACS team justify continued updates and support.

Please use both the BAMS paper and dataset citations when referencing IBTrACS in a written work that has a bibliography:

  • Knapp, K. R., M. C. Kruk, D. H. Levinson, H. J. Diamond, and C. J. Neumann, 2010: The International Best Track Archive for Climate Stewardship (IBTrACS): Unifying tropical cyclone best track data. Bulletin of the American Meteorological Society, 91, 363-376. doi:10.1175/2009BAMS2755.1

  • Gahtan, J., K. R. Knapp, C. J. Schreck, H. J. Diamond, J. P. Kossin, M. C. Kruk, 2024: International Best Track Archive for Climate Stewardship (IBTrACS) Project, Version 4r01. [indicate subset used]. NOAA National Centers for Environmental Information. doi:10.25921/82ty-9e16 [access date].

When the written work does not have a bibliography, please use:

  • NOAA’s International Best Track Archive for Climate Stewardship (IBTrACS) data, accessed on [Access Date]

OLD

Hurricane Center: Storm Reports Index ends in 2023

https://www.nhc.noaa.gov/TCR_StormReportsIndex.xml

librarian::shelf(
  dplyr, purrr, stringr, tibble, tidyr, XML, xml2)

h_xml <- "https://www.nhc.noaa.gov/TCR_StormReportsIndex.xml"

d <- read_xml(h_xml) |> 
  xmlParse() |> 
  getNodeSet("//row") |> 
  xmlToDataFrame() |> 
  tibble() |> 
  filter(
    Basin == "Atlantic")
d |> 
  filter(Year == 1958)

d$Year |> table()
# 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 
#   10   10    7   10    5    3   12    6   12    9    7   13    7   11    4    7    8    8    8    6 
# 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 
#   12    9   11   12    6    4   13   11    6    8   12   11   14   10   10   10   12   19   13    7 
# 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 
#   13   15   18   17   14   19   15   29   10   16   17   11   21   19   19   14    9   12   16   18 
# 2018 2019 2020 2021 2022 2023 
#   16   18   30   20   16   20
rx_stormname
rx_stormreporturl

d |> 
  mutate(
    # regular expression for last word before (Atlantic)
    basin = str_replace(StormName, ".* \\w (Atlantic)") )

# https://www.nhc.noaa.gov/gis/best_track/al032023_best_track.zip
# https://www.nhc.noaa.gov/data/tcr/AL022023_Arlene.pdf
# https://www.nhc.noaa.gov/gis/best_track/al022023_best_track.zip
# https://www.nhc.noaa.gov/gis/best_track/al032023_best_track.zip

d |> 
  filter(
    Year      == "2023",
    StormName == "Arlene")

d |> 
  tidyr::as_tibble()
  unlist()
map_chr(d, "StormName")
  tibble(
    StormName = xml_text(xml_find_first(., "StormName")))

d <- d |> as_list()
d %>% tibble(
  StormName = map_chr(., "StormName"))

tibble(StormName = map_chr(., xml_text),
       b = map_chr(., xml_attr, "onclick"))

  as_list() |> 
  pluck("StormReportInfo")
d[1:3] |> hoist(
  "row", 
  year = list("Year", 1L))

as_tibble() 

# |> 
#   pluck()
#   as_tibble()
# xml2::data

HURDAT

librarian::shelf(
  dplyr, timtrice/HURDAT)

# ?HURDAT
al <- get_hurdat(basin = "AL") |> tibble()
range(al$DateTime, na.rm = T)
# "1851-06-25 00:00:00 LMT" "2023-10-31 18:00:00 CET"
# ?AL

HurreconR

hurricaneexposure

librarian::shelf(drat)
addRepo("geanders")
librarian::shelf(hurricaneexposuredata)

hurr_tracks |> tail()

rnoaa

swdi()
  • Severe Weather Data Inventory map

    1992-2024

  • Storm Events Database | NCEI
    January 1950 to April 2024

    • Storm Events Database | NCEI
      1. Tornado: From 1950 through 1954, only tornado events were recorded.

      2. Tornado, Thunderstorm Wind and Hail: From 1955 through 1992, only tornado, thunderstorm wind and hail events were keyed from the paper publications into digital data. From 1993 to 1995, only tornado, thunderstorm wind and hail events have been extracted from the Unformatted Text Files.

      3. All Event Types (48 from Directive 10-1605): From 1996 to present, 48 event types are recorded as defined in NWS Directive 10-1605.

    • Storm Events Database - FAQ | National Centers for Environmental Information
      When does data become available?

      Due to the amount of time it takes to collect, validate, and enter post Storm Data information, the National Centers for Environmental Information (NCEI) regularly receives Storm Data from the National Weather Service (NWS) approximately 75 days after the end of a data month. (Ex: The January data month is usually available on or around April 15th)

      The NWS has 60 days to submit their data files to the NWS Headquarters in Silver Spring, MD. The NWS Headquarters (NWSHQ) then collects all of the data files from the 123 NWS Forecast Offices. The NCEI receives a copy of this database approximately 75 days after the end of the month. A publication and archive are produced and the Storm Events Database are updated within 75-90 days after the end of a data month.

      Where does the data come from?

      NCEI receives Storm Data from the National Weather Service. The National Weather service receives their information from a variety of sources, which include but are not limited to: county, state and federal emergency management officials, local law enforcement officials, skywarn spotters, NWS damage surveys, newspaper clipping services, the insurance industry and the general public, among others.

noaastormevents

https://github.com/geanders/noaastormevents